﻿
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		
		<title>jb-aptech毕业设计项目</TITLE>
<meta name="renderer" content="ie-comp">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="../../css/style.css" rel="stylesheet" type="text/css">
		<link rel="stylesheet" href="../../css/menu.css">

		<script src="../../script/jquery-3.3.1.min.js"></script>
		<script src="../../script/common.js"></script>
		<script src="../../../js/bootstrap.min.js"></script>
		<script src="../../../js/vue.js"></script>
	</head>
	<body>
	<div id="querybyid">
		<div class="page_title">
			权限管理 > 权限管理 > 添加权限
		</div>
			<div class="button_bar">
				<button class="common_button" onClick="help('');">
					帮助
				</button>
				<button class="common_button" @Click="go()">
					添加
				</button>
				<button class="common_button" onClick="back();">
					返回
				</button>
				
			</div>
			<table class="query_form_table">
				<tr>
					<th>
						编号
					</th>
					<td>
						{{might.might_code}}
					</td>
					<th>
						权限类型
					</th>
					<td>
						{{might.might_icon}}
					</td>
					<th>
						父节点
					</th>
					<td>
						<span v-if="might.might_code!=0">{{might.might_code}}</span>
						<span v-if="might.might_code==0">ROOT_MENU</span>
					</td>
				</tr>
				<tr>
					<th>
						权限文本
					</th>
					<td>
						{{might.might_text}}
					</td>
					<th>
						权限URL
					</th>
					<td>
						{{might.might_url}}
					</td>
					<th>权限描述</th>
					<td>
						{{might.might_tip}}
					</td>
				</tr>
			</table>
	</div>
	</body>
<script>
	var app = new Vue({
		el:'#querybyid',
		data:{
			might:{
                might_code:'',
                might_icon:'',
                might_parent_code:'',
                might_text:'',
                might_url:'',
                might_tip:'',
			}
		},
		methods:{
			go(){
			    var id;
			    if(this.might.might_parent_code!=0){
					id=this.might.might_parent_code;
				}else {
			        id=this.might.might_code;
				}
				sessionStorage.setItem("codeid",id);
			    location='add.html';
			}
		},
		created(){
		    let id = sessionStorage.getItem("mid");
		    $.getJSON("/querySysMightById/"+id,function (json) {
				app.might=json.data.obj;
            });
		}
	})
</script>
</html>
